﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LifeSoft.GUI.usrControl
{
    public partial class usrMain : UserControl
    {
        public usrMain()
        {
            InitializeComponent();
        }

        public void usrMain_Load(object sender, EventArgs e)
        {
            btWareHouse.ContextMenuStrip = menuWareHouseChil;
            btSellGood.ContextMenuStrip = menuSellGood;
            btPurchase.ContextMenuStrip = menuPurchase;
            btContract.ContextMenuStrip = menuContract;
        }

        private void btSellGood_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                btSellGood.ContextMenuStrip.Show(btSellGood, new Point(e.X, e.Y));
            }
        }

        private void btPurchase_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                btPurchase.ContextMenuStrip.Show(btPurchase, new Point(e.X, e.Y));
            }
        }

        private void btContract_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                btContract.ContextMenuStrip.Show(btContract, new Point(e.X, e.Y));
            }
        }

        private void btWareHouse_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                btWareHouse.ContextMenuStrip.Show(btWareHouse, new Point(e.X, e.Y));
            }
        }

        private void btWareHouse_MouseHover(object sender, EventArgs e)
        {
            btWareHouse.BorderStyle = BorderStyle.Fixed3D;
        }

        private void btWareHouse_MouseLeave(object sender, EventArgs e)
        {
            btWareHouse.BorderStyle = BorderStyle.None;
        }

        private void btSellGood_MouseHover(object sender, EventArgs e)
        {
            btSellGood.BorderStyle = BorderStyle.Fixed3D;
        }

        private void btSellGood_MouseLeave(object sender, EventArgs e)
        {
            btSellGood.BorderStyle = BorderStyle.None;
        }

        private void btPurchase_MouseHover(object sender, EventArgs e)
        {
            btPurchase.BorderStyle = BorderStyle.Fixed3D;
        }

        private void btPurchase_MouseLeave(object sender, EventArgs e)
        {
            btPurchase.BorderStyle = BorderStyle.None;
        }

        private void btContract_MouseHover(object sender, EventArgs e)
        {
            btContract.BorderStyle = BorderStyle.Fixed3D;
        }

        private void btContract_MouseLeave(object sender, EventArgs e)
        {
            btContract.BorderStyle = BorderStyle.None;
        }

        private void btBookSynthetic_MouseHover(object sender, EventArgs e)
        {
            btBookSynthetic.BorderStyle = BorderStyle.Fixed3D;
        }

        private void btBookSynthetic_MouseLeave(object sender, EventArgs e)
        {
            btBookSynthetic.BorderStyle = BorderStyle.None;
        }
    }
}
